

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>NURESTRootObject &mdash; tdldk  documentation</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="tdldk  documentation" href="../index.html"/>
        <link rel="up" title="Bambou API Reference" href="../bambou_reference.html"/>
        <link rel="next" title="NURESTSession" href="bambou.nurestsession.html"/>
        <link rel="prev" title="NURESTResponse" href="bambou.nurestresponse.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-nav-search">
        

        
          <a href="../index.html" class="icon icon-home"> tdldk
        

        
          
          <img src="../_static/logo.png" class="logo" />
        
        </a>

        
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

        
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
        
          
          
              <ul>
<li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li>
<li class="toctree-l1"><a class="reference internal" href="../general_concepts.html">General Concepts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../general_concepts.html#introduction">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="../general_concepts.html#nurestsession">NURESTSession</a></li>
<li class="toctree-l2"><a class="reference internal" href="../general_concepts.html#nurestobject">NURESTObject</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#rest-names">ReST Names</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#rest-api-uri-generation">ReST API URI Generation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#exposing-rest-attributes">Exposing ReST Attributes</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#crud-operations">CRUD Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#converting-to-and-from-a-python-dictionary">Converting to and from a Python Dictionary</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../general_concepts.html#nurestfetcher">NURESTFetcher</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#fetching-children-list">Fetching Children List</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#discussion-about-fetchers">Discussion about Fetchers</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../general_concepts.html#nurestpushcenter">NURESTPushCenter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#using-the-nurestpushcenter">Using the NURESTPushCenter</a></li>
<li class="toctree-l3"><a class="reference internal" href="../general_concepts.html#example">Example</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../general_concepts.html#conclusion">Conclusion</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../tdldk_1.0_reference.html">TDLDK API 1.0 Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/models.galist.html">GAList</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.galist.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.galist.html#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.galist.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.galist.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/models.garoot.html">GARoot</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.garoot.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.garoot.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/models.gatask.html">GATask</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatask.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatask.html#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatask.html#constants">Constants</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatask.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatask.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/models.gatdlsession.html">GATDLSession</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatdlsession.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatdlsession.html#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatdlsession.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gatdlsession.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/models.gauser.html">GAUser</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gauser.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gauser.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.gauser.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/models.sdkinfo.html">SDKInfo</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/models.sdkinfo.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/fetchers.galistsfetcher.html">GAListsFetcher</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.galistsfetcher.html#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.galistsfetcher.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.galistsfetcher.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/fetchers.gatasksfetcher.html">GATasksFetcher</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.gatasksfetcher.html#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.gatasksfetcher.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.gatasksfetcher.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../tdldk/1.0/fetchers.gausersfetcher.html">GAUsersFetcher</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.gausersfetcher.html#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.gausersfetcher.html#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="../tdldk/1.0/fetchers.gausersfetcher.html#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../bambou_reference.html">Bambou API Reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="bambou.bambouconfig.html">BambouConfig</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.bambouconfig.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestconnection.html">NURESTConnection</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestconnection.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestconnection.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestfetcher.html">NURESTFetcher</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestfetcher.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestfetcher.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestlogincontroller.html">NURESTLoginController</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestlogincontroller.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestlogincontroller.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestmodelcontroller.html">NURESTModelController</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestmodelcontroller.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestobject.html">NURESTObject</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestobject.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestobject.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestpushcenter.html">NURESTPushCenter</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestpushcenter.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestpushcenter.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestrequest.html">NURESTRequest</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestrequest.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestrequest.html#methods">Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestresponse.html">NURESTResponse</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestresponse.html#properties">Properties</a></li>
</ul>
</li>
<li class="toctree-l2 current"><a class="current reference internal" href="">NURESTRootObject</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="#methods">Methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="#inherited-properties">Inherited Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="#inherited-methods">Inherited Methods</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="bambou.nurestsession.html">NURESTSession</a><ul>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestsession.html#properties">Properties</a></li>
<li class="toctree-l3"><a class="reference internal" href="bambou.nurestsession.html#methods">Methods</a></li>
</ul>
</li>
</ul>
</li>
</ul>

          
        
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="../index.html">tdldk</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="../index.html">Docs</a> &raquo;</li>
      
          <li><a href="../bambou_reference.html">Bambou API Reference</a> &raquo;</li>
      
    <li>NURESTRootObject</li>
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../_sources/bambou/bambou.nurestrootobject.txt" rel="nofollow"> View page source</a>
          
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document">
            
  <div class="section" id="nurestrootobject">
<h1>NURESTRootObject<a class="headerlink" href="#nurestrootobject" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="bambou.NURESTRootObject">
<em class="property">class </em><code class="descname">NURESTRootObject</code><a class="reference internal" href="../_modules/bambou/nurest_root_object.html#NURESTRootObject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bambou.NURESTRootObject" title="Permalink to this definition">¶</a></dt>
<dd><p>NURESTRootObject defines a user that can log in.</p>
<p>Only one NURESTRootObject can be connected at a time.</p>
</dd></dl>

<div class="section" id="properties">
<h2>Properties<a class="headerlink" href="#properties" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><dl class="attribute">
<dt id="bambou.NURESTRootObject.api_key">
<code class="descclassname">NURESTRootObject.</code><code class="descname">api_key</code><a class="headerlink" href="#bambou.NURESTRootObject.api_key" title="Permalink to this definition">¶</a></dt>
<dd><p>Get API Key</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.password">
<code class="descclassname">NURESTRootObject.</code><code class="descname">password</code><a class="headerlink" href="#bambou.NURESTRootObject.password" title="Permalink to this definition">¶</a></dt>
<dd><p>Get password</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.user_name">
<code class="descclassname">NURESTRootObject.</code><code class="descname">user_name</code><a class="headerlink" href="#bambou.NURESTRootObject.user_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Get user_name</p>
</dd></dl>

</div></blockquote>
</div>
<div class="section" id="methods">
<h2>Methods<a class="headerlink" href="#methods" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><dl class="method">
<dt id="bambou.NURESTRootObject.fetch">
<code class="descclassname">NURESTRootObject.</code><code class="descname">fetch</code><span class="sig-paren">(</span><em>async=False</em>, <em>callback=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/bambou/nurest_root_object.html#NURESTRootObject.fetch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bambou.NURESTRootObject.fetch" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetch all information about the current object</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>async</strong> (<em>bool</em>) &#8211; Boolean to make an asynchronous call. Default is False</li>
<li><strong>callback</strong> (<em>function</em>) &#8211; Callback method that will be triggered in case of asynchronous call</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">(current_fetcher, callee_parent, fetched_bjects, connection)</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">tuple</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">entity</span> <span class="o">=</span> <span class="n">NUEntity</span><span class="p">(</span><span class="nb">id</span><span class="o">=</span><span class="s">&quot;xxx-xxx-xxx-xxx&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">entity</span><span class="o">.</span><span class="n">fetch</span><span class="p">()</span> <span class="c"># will get the entity with id &quot;xxx-xxx-xxx-xxx&quot;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">entity</span><span class="o">.</span><span class="n">name</span>
<span class="go">&quot;My Entity&quot;</span>
</pre></div>
</div>
</dd></dl>

<dl class="classmethod">
<dt id="bambou.NURESTRootObject.get_default_root_object">
<em class="property">classmethod </em><code class="descclassname">NURESTRootObject.</code><code class="descname">get_default_root_object</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/bambou/nurest_root_object.html#NURESTRootObject.get_default_root_object"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bambou.NURESTRootObject.get_default_root_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Get default user</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.get_resource_url">
<code class="descclassname">NURESTRootObject.</code><code class="descname">get_resource_url</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/bambou/nurest_root_object.html#NURESTRootObject.get_resource_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bambou.NURESTRootObject.get_resource_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Get resource complete url</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.get_resource_url_for_child_type">
<code class="descclassname">NURESTRootObject.</code><code class="descname">get_resource_url_for_child_type</code><span class="sig-paren">(</span><em>nurest_object_type</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/bambou/nurest_root_object.html#NURESTRootObject.get_resource_url_for_child_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bambou.NURESTRootObject.get_resource_url_for_child_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the resource url for the nurest_object type</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.prepare_change_password">
<code class="descclassname">NURESTRootObject.</code><code class="descname">prepare_change_password</code><span class="sig-paren">(</span><em>new_password</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/bambou/nurest_root_object.html#NURESTRootObject.prepare_change_password"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bambou.NURESTRootObject.prepare_change_password" title="Permalink to this definition">¶</a></dt>
<dd><p>Prepares password modification</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.save">
<code class="descclassname">NURESTRootObject.</code><code class="descname">save</code><span class="sig-paren">(</span><em>async=False</em>, <em>callback=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/bambou/nurest_root_object.html#NURESTRootObject.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bambou.NURESTRootObject.save" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates the user and perform the callback method</p>
</dd></dl>

</div></blockquote>
</div>
<div class="section" id="inherited-properties">
<h2>Inherited Properties<a class="headerlink" href="#inherited-properties" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><dl class="attribute">
<dt id="bambou.NURESTRootObject.children_rest_names">
<code class="descclassname">NURESTRootObject.</code><code class="descname">children_rest_names</code><a class="headerlink" href="#bambou.NURESTRootObject.children_rest_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the list of all possible children ReST names.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list containing all possible rest names as string</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">entity</span> <span class="o">=</span> <span class="n">NUEntity</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">entity</span><span class="o">.</span><span class="n">children_rest_names</span>
<span class="go">[&quot;foo&quot;, &quot;bar&quot;]</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.creation_date">
<code class="descclassname">NURESTRootObject.</code><code class="descname">creation_date</code><a class="headerlink" href="#bambou.NURESTRootObject.creation_date" title="Permalink to this definition">¶</a></dt>
<dd><p>Get creation date</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.errors">
<code class="descclassname">NURESTRootObject.</code><code class="descname">errors</code><a class="headerlink" href="#bambou.NURESTRootObject.errors" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.fetchers">
<code class="descclassname">NURESTRootObject.</code><code class="descname">fetchers</code><a class="headerlink" href="#bambou.NURESTRootObject.fetchers" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a copy of all fetchers</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">list of all fetchers</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">entity</span><span class="o">.</span><span class="n">fetchers</span>
<span class="go">[&lt;NUSubEntitiesFetcher at xxxx&gt;, &lt;NUOtherEntitiesFetcher at yyyy&gt;]</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.id">
<code class="descclassname">NURESTRootObject.</code><code class="descname">id</code><a class="headerlink" href="#bambou.NURESTRootObject.id" title="Permalink to this definition">¶</a></dt>
<dd><p>Get object id</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.last_updated_date">
<code class="descclassname">NURESTRootObject.</code><code class="descname">last_updated_date</code><a class="headerlink" href="#bambou.NURESTRootObject.last_updated_date" title="Permalink to this definition">¶</a></dt>
<dd><p>Get last update date</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.local_id">
<code class="descclassname">NURESTRootObject.</code><code class="descname">local_id</code><a class="headerlink" href="#bambou.NURESTRootObject.local_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Get local id</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.owner">
<code class="descclassname">NURESTRootObject.</code><code class="descname">owner</code><a class="headerlink" href="#bambou.NURESTRootObject.owner" title="Permalink to this definition">¶</a></dt>
<dd><p>Get owner</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.parent_id">
<code class="descclassname">NURESTRootObject.</code><code class="descname">parent_id</code><a class="headerlink" href="#bambou.NURESTRootObject.parent_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Get parent id</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.parent_object">
<code class="descclassname">NURESTRootObject.</code><code class="descname">parent_object</code><a class="headerlink" href="#bambou.NURESTRootObject.parent_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Get parent</p>
</dd></dl>

<dl class="attribute">
<dt id="bambou.NURESTRootObject.parent_type">
<code class="descclassname">NURESTRootObject.</code><code class="descname">parent_type</code><a class="headerlink" href="#bambou.NURESTRootObject.parent_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Get parent type</p>
</dd></dl>

</div></blockquote>
</div>
<div class="section" id="inherited-methods">
<h2>Inherited Methods<a class="headerlink" href="#inherited-methods" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><dl class="method">
<dt id="bambou.NURESTRootObject.add_child">
<code class="descclassname">NURESTRootObject.</code><code class="descname">add_child</code><span class="sig-paren">(</span><em>child</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.add_child" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a child</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.assign">
<code class="descclassname">NURESTRootObject.</code><code class="descname">assign</code><span class="sig-paren">(</span><em>objects</em>, <em>nurest_object_type</em>, <em>async=False</em>, <em>callback=None</em>, <em>commit=True</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.assign" title="Permalink to this definition">¶</a></dt>
<dd><p>Reference a list of objects into the current resource</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>objects</strong> (<em>list</em>) &#8211; list of NURESTObject to link</li>
<li><strong>nurest_object_type</strong> (<em>type</em>) &#8211; Type of the object to link</li>
<li><strong>callback</strong> (<em>function</em>) &#8211; Callback method that should be fired at the end</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Returns the current object and the connection (object, connection)</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">entity</span><span class="o">.</span><span class="n">assign</span><span class="p">([</span><span class="n">entity1</span><span class="p">,</span> <span class="n">entity2</span><span class="p">,</span> <span class="n">entity3</span><span class="p">],</span> <span class="n">NUEntity</span><span class="p">)</span> <span class="c"># entity1, entity2 and entity3 are now part of the entity</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.copy">
<code class="descclassname">NURESTRootObject.</code><code class="descname">copy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a copy of the current object</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A copy of the given object</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">entity</span><span class="o">.</span><span class="n">to_dict</span><span class="p">()</span>
<span class="go">&lt;Entity object at 0x10b9d4910&gt;</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.create_child">
<code class="descclassname">NURESTRootObject.</code><code class="descname">create_child</code><span class="sig-paren">(</span><em>nurest_object</em>, <em>response_choice=None</em>, <em>async=False</em>, <em>callback=None</em>, <em>commit=True</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.create_child" title="Permalink to this definition">¶</a></dt>
<dd><p>Add given nurest_object to the current object</p>
<p>For example, to add a child into a parent, you can call
parent.create_child(nurest_object=child)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>nurest_object</strong> (<a class="reference internal" href="bambou.nurestobject.html#bambou.NURESTObject" title="bambou.NURESTObject"><em>bambou.NURESTObject</em></a>) &#8211; the NURESTObject object to add</li>
<li><strong>response_choice</strong> (<em>int</em>) &#8211; Automatically send a response choice when confirmation is needed</li>
<li><strong>async</strong> (<em>bool</em>) &#8211; should the request be done asynchronously or not</li>
<li><strong>callback</strong> (<em>function</em>) &#8211; callback containing the object and the connection</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Returns the object and connection (object, connection)</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">entity</span> <span class="o">=</span> <span class="n">NUEntity</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;Super Entity&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parent_entity</span><span class="o">.</span><span class="n">create_child</span><span class="p">(</span><span class="n">entity</span><span class="p">)</span> <span class="c"># the new entity as been created in the parent_entity</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.delete">
<code class="descclassname">NURESTRootObject.</code><code class="descname">delete</code><span class="sig-paren">(</span><em>response_choice=1</em>, <em>async=False</em>, <em>callback=None</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.delete" title="Permalink to this definition">¶</a></dt>
<dd><p>Delete object and call given callback in case of call.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>response_choice</strong> (<em>int</em>) &#8211; Automatically send a response choice when confirmation is needed</li>
<li><strong>async</strong> (<em>bool</em>) &#8211; Boolean to make an asynchronous call. Default is False</li>
<li><strong>callback</strong> (<em>function</em>) &#8211; Callback method that will be triggered in case of asynchronous call</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">entity</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span> <span class="c"># will delete the enterprise from the server</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.equals">
<code class="descclassname">NURESTRootObject.</code><code class="descname">equals</code><span class="sig-paren">(</span><em>rest_object</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.equals" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare with another object</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.expose_attribute">
<code class="descclassname">NURESTRootObject.</code><code class="descname">expose_attribute</code><span class="sig-paren">(</span><em>local_name</em>, <em>attribute_type</em>, <em>remote_name=None</em>, <em>display_name=None</em>, <em>is_required=False</em>, <em>is_readonly=False</em>, <em>max_length=None</em>, <em>min_length=None</em>, <em>is_identifier=False</em>, <em>choices=None</em>, <em>is_unique=False</em>, <em>is_email=False</em>, <em>is_login=False</em>, <em>is_editable=True</em>, <em>is_password=False</em>, <em>can_order=False</em>, <em>can_search=False</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.expose_attribute" title="Permalink to this definition">¶</a></dt>
<dd><p>Expose local_name as remote_name</p>
<p>An exposed attribute <cite>local_name</cite> will be sent within the HTTP request as
a <cite>remote_name</cite></p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.fetcher_for_rest_name">
<code class="descclassname">NURESTRootObject.</code><code class="descname">fetcher_for_rest_name</code><span class="sig-paren">(</span><em>rest_name</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.fetcher_for_rest_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the children fetcher for the given rest name</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>rest_name</strong> (<em>string</em>) &#8211; the children rest name</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Returns the corresponding fetcher</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">entity</span><span class="o">.</span><span class="n">fetcher_for_rest_name</span><span class="p">(</span><span class="n">NUSubEntity</span><span class="o">.</span><span class="n">rest_name</span><span class="p">)</span>
<span class="go">&lt;NUSubEntitiesFetcher at yyyy&gt;</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.from_dict">
<code class="descclassname">NURESTRootObject.</code><code class="descname">from_dict</code><span class="sig-paren">(</span><em>dictionary</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.from_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets all the exposed ReST attribues from the given dictionary</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dictionary</strong> (<em>dict</em>) &#8211; dictionnary containing the raw object attributes and their values.</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">info</span> <span class="o">=</span> <span class="p">{</span><span class="s">&quot;name&quot;</span><span class="p">:</span> <span class="s">&quot;my group&quot;</span><span class="p">,</span> <span class="s">&quot;private&quot;</span><span class="p">:</span> <span class="bp">False</span><span class="p">}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">group</span> <span class="o">=</span> <span class="n">NUGroup</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">group</span><span class="o">.</span><span class="n">from_dict</span><span class="p">(</span><span class="n">info</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="s">&quot;name: </span><span class="si">%s</span><span class="s"> - private: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">group</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">group</span><span class="o">.</span><span class="n">private</span><span class="p">)</span>
<span class="go">&quot;name: my group - private: False&quot;</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.genealogic_ids">
<code class="descclassname">NURESTRootObject.</code><code class="descname">genealogic_ids</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.genealogic_ids" title="Permalink to this definition">¶</a></dt>
<dd><p>Get all genealogic ids</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A list of all parent ids</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.genealogic_types">
<code class="descclassname">NURESTRootObject.</code><code class="descname">genealogic_types</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.genealogic_types" title="Permalink to this definition">¶</a></dt>
<dd><p>Get genealogic types</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Returns a list of all parent types</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.genealogy_contains_id">
<code class="descclassname">NURESTRootObject.</code><code class="descname">genealogy_contains_id</code><span class="sig-paren">(</span><em>id</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.genealogy_contains_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if parents contains an object of type resource_name</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>id</strong> &#8211; the id of the resource to find</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Returns True if a parent with specific id has been found. False otherwise.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.genealogy_contains_type">
<code class="descclassname">NURESTRootObject.</code><code class="descname">genealogy_contains_type</code><span class="sig-paren">(</span><em>resource_name</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.genealogy_contains_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if parents contains an object of type resource_name</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>resource_name</strong> &#8211; the name of the resource to find</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Returns True if a parent of type has been found. False otherwise.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.get_attribute_infos">
<code class="descclassname">NURESTRootObject.</code><code class="descname">get_attribute_infos</code><span class="sig-paren">(</span><em>local_name</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.get_attribute_infos" title="Permalink to this definition">¶</a></dt>
<dd><p>Get exposed attribute information</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>local_name</strong> &#8211; the attribute name</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A dictionary of all information</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.get_attributes">
<code class="descclassname">NURESTRootObject.</code><code class="descname">get_attributes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.get_attributes" title="Permalink to this definition">¶</a></dt>
<dd><p>Get all attributes information</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Returns a dictionnary containing attribute information</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.get_formated_creation_date">
<code class="descclassname">NURESTRootObject.</code><code class="descname">get_formated_creation_date</code><span class="sig-paren">(</span><em>format='%b %Y %d %H:%I:%S'</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.get_formated_creation_date" title="Permalink to this definition">¶</a></dt>
<dd><p>Return creation date with a given format. Default is &#8216;%b %Y %d %H:%I:%S&#8217;</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.instantiate_child">
<code class="descclassname">NURESTRootObject.</code><code class="descname">instantiate_child</code><span class="sig-paren">(</span><em>nurest_object</em>, <em>from_template</em>, <em>response_choice=None</em>, <em>async=False</em>, <em>callback=None</em>, <em>commit=True</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.instantiate_child" title="Permalink to this definition">¶</a></dt>
<dd><p>Instantiate an nurest_object from a template object</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>nurest_object</strong> &#8211; the NURESTObject object to add</li>
<li><strong>from_template</strong> &#8211; the NURESTObject template object</li>
<li><strong>callback</strong> &#8211; callback containing the object and the connection</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Returns the object and connection (object, connection)</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">parent_entity</span> <span class="o">=</span> <span class="n">NUParentEntity</span><span class="p">(</span><span class="nb">id</span><span class="o">=</span><span class="s">&quot;xxxx-xxxx-xxx-xxxx&quot;</span><span class="p">)</span> <span class="c"># create a NUParentEntity with an existing ID (or retrieve one)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">other_entity_template</span> <span class="o">=</span> <span class="n">NUOtherEntityTemplate</span><span class="p">(</span><span class="nb">id</span><span class="o">=</span><span class="s">&quot;yyyy-yyyy-yyyy-yyyy&quot;</span><span class="p">)</span> <span class="c"># create a NUOtherEntityTemplate with an existing ID (or retrieve one)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">other_entity_instance</span> <span class="o">=</span> <span class="n">NUOtherEntityInstance</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&quot;my new instance&quot;</span><span class="p">)</span> <span class="c"># create a new NUOtherEntityInstance to be intantiated from other_entity_template</span>
<span class="go">&gt;&gt;&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parent_entity</span><span class="o">.</span><span class="n">instantiate_child</span><span class="p">(</span><span class="n">other_entity_instance</span><span class="p">,</span> <span class="n">other_entity_template</span><span class="p">)</span> <span class="c"># instatiate the new domain in the server</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.is_owned_by_current_user">
<code class="descclassname">NURESTRootObject.</code><code class="descname">is_owned_by_current_user</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.is_owned_by_current_user" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if the current user owns the object</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.is_valid">
<code class="descclassname">NURESTRootObject.</code><code class="descname">is_valid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.is_valid" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.object_with_id">
<code class="descclassname">NURESTRootObject.</code><code class="descname">object_with_id</code><span class="sig-paren">(</span><em>id</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.object_with_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a new object with the given id</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Returns a new instance with specified id</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.parent_for_matching_rest_name">
<code class="descclassname">NURESTRootObject.</code><code class="descname">parent_for_matching_rest_name</code><span class="sig-paren">(</span><em>rest_names</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.parent_for_matching_rest_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Return parent that matches a rest name</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.register_fetcher">
<code class="descclassname">NURESTRootObject.</code><code class="descname">register_fetcher</code><span class="sig-paren">(</span><em>fetcher</em>, <em>rest_name</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.register_fetcher" title="Permalink to this definition">¶</a></dt>
<dd><p>Register a children fetcher</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.remove_child">
<code class="descclassname">NURESTRootObject.</code><code class="descname">remove_child</code><span class="sig-paren">(</span><em>child</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.remove_child" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a child</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.rest_base_url">
<code class="descclassname">NURESTRootObject.</code><code class="descname">rest_base_url</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.rest_base_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Override this method to set object base url</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.rest_equals">
<code class="descclassname">NURESTRootObject.</code><code class="descname">rest_equals</code><span class="sig-paren">(</span><em>rest_object</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.rest_equals" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare objects REST attributes</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.send_request">
<code class="descclassname">NURESTRootObject.</code><code class="descname">send_request</code><span class="sig-paren">(</span><em>request</em>, <em>async=False</em>, <em>local_callback=None</em>, <em>remote_callback=None</em>, <em>user_info=None</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.send_request" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a request, calls the local callback, then the remote callback in case of async call</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>request</strong> &#8211; The request to send</li>
<li><strong>local_callback</strong> &#8211; local method that will be triggered in case of async call</li>
<li><strong>remote_callback</strong> &#8211; remote moethd that will be triggered in case of async call</li>
<li><strong>user_info</strong> &#8211; contains additionnal information to carry during the request</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Returns the object and connection (object, connection)</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.to_dict">
<code class="descclassname">NURESTRootObject.</code><code class="descname">to_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.to_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts the current object into a Dictionary using all exposed ReST attributes.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the dictionary containing all the exposed ReST attributes and their values.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">entity</span><span class="o">.</span><span class="n">to_dict</span><span class="p">()</span>
<span class="go">{&quot;name&quot;: &quot;my entity&quot;, &quot;description&quot;: &quot;Hello World&quot;, &quot;ID&quot;: &quot;xxxx-xxx-xxxx-xxx&quot;, ...}</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.update_child">
<code class="descclassname">NURESTRootObject.</code><code class="descname">update_child</code><span class="sig-paren">(</span><em>child</em><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.update_child" title="Permalink to this definition">¶</a></dt>
<dd><p>Update child</p>
</dd></dl>

<dl class="method">
<dt id="bambou.NURESTRootObject.validate">
<code class="descclassname">NURESTRootObject.</code><code class="descname">validate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#bambou.NURESTRootObject.validate" title="Permalink to this definition">¶</a></dt>
<dd><p>Validate the current object attributes.</p>
<p>Check all attributes and store errors</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Returns True if all attibutes of the object
respect contraints. Returns False otherwise and
store error in errors dict.</td>
</tr>
</tbody>
</table>
</dd></dl>

</div></blockquote>
</div>
</div>


          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="bambou.nurestsession.html" class="btn btn-neutral float-right" title="NURESTSession" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="bambou.nurestresponse.html" class="btn btn-neutral" title="NURESTResponse" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright Copyright (c) 2015, Nuage Networks.
    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'../',
            VERSION:'',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="../_static/jquery.js"></script>
      <script type="text/javascript" src="../_static/underscore.js"></script>
      <script type="text/javascript" src="../_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="../_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>